package com.code.day08.Collects;

import java.awt.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedList;

public class Demo1  {
    public static void main(String[] args) {
        Collection<String> c1 = new ArrayList<>();
        //boolean add(E e) 元素添加到集合中
        c1.add("a");
        c1.add("b");
        //boolean addAll(Collection <extend E> c) 将另一个集合中的元素添加到当前集合中
        System.out.println(c1);
        boolean st1 = c1.contains("a");
        boolean st2 = c1.isEmpty();
        System.out.println(st2);
    }
}
